/*
 * Ext GWT 2.2.5 - Ext for GWT
 * Copyright(c) 2007-2010, Ext JS, LLC.
 * licensing@extjs.com
 * 
 * http://extjs.com/license
 */
package com.rattsoftware.client.model;

import com.extjs.gxt.ui.client.data.BaseModelData;
import com.rattsoftware.server.admin.model.Room;

public class RoomSummary extends BaseModelData {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Room room;

	public RoomSummary() {

	}

	public RoomSummary(Room room) {
		setRoom(room);
		setId(room.getId());
		setRoomNumber(room.getRoomNumber());
		setLevel(room.getLevel());
		setCapacity(room.getCapacity());
		setRoomState(room.getRoomstate());
		setRoomCategory(room.getRoomcategory());
		setRoomsize(room.getRoomsize());
	}
	
	public RoomSummary(String id, String roomNumber, String level, String capacity,
			String roomstate, String roomcategory, String roomsize) {
		setId(id);
		setRoomNumber(roomNumber);
		setLevel(level);
		setCapacity(capacity);
		setRoomState(roomstate);
		setRoomCategory(roomcategory);
		setRoomsize(roomsize);
	}

	public void setId(String id) {
		room.setId(id);
		set("roomId", id);
	}

	public String getId() {
		return get("roomId");
	}
	
	public String getRoomNumber() {
		return get("roomNumber");
	}

	public void setRoomNumber(String roomNumber) {
		room.setRoomNumber(roomNumber);
		set("roomNumber", roomNumber);
	}

	public String getLevel() {
		return get("level");
	}

	public void setLevel(String level) {
		room.setLevel(level);
		set("level", level);
	}

	public String getCapacity() {
		return get("capacity");
	}

	public void setCapacity(String capacity) {
		room.setCapacity(capacity);
		set("capacity", capacity);
	}

	public String getRoomState() {
		return get("roomstate");
	}

	public void setRoomState(String roomstate) {
		room.setRoomstate(roomstate);
		set("roomstate", roomstate);
	}

	public String getRoomCategory() {
		return get("roomcategory");
	}

	public void setRoomCategory(String roomcategory) {
		room.setRoomcategory(roomcategory);
		set("roomcategory", roomcategory);
	}
	
	public void setRoomsize(String roomsize) {
		room.setRoomsize(roomsize);
		set("roomsize", roomsize);
	}

	public String getRoomsize() {
		return get("roomsize");
	}
	
	public void setRoom(Room room) {
		this.room = room;
	}

	public Room getRoom() {
		return this.room;
	}
	
	public void updateRoomSummary(Room room) {
		setId(room.getId());
		setRoomNumber(room.getRoomNumber());
		setLevel(room.getLevel());
		setCapacity(room.getCapacity());
		setRoomState(room.getRoomstate());
		setRoomCategory(room.getRoomcategory());
		setRoomsize(room.getRoomsize());
	}
}
